namespace Microsoft.ServiceModel.Samples.Discovery
{
    using System;
    using System.Xml;
    using Microsoft.ServiceModel.Samples.Discovery.Protocol;

    internal class ProbeContext : FindContext
    {
        IncrementalResultsCallback incrementalCallback;
        Probe probe;

        public ProbeContext(MatchCriteria matchCriteria, TimeSpan findDutation,
            int maxResults, IncrementalResultsCallback incrementalCallback)
            : this(Probe.FromMatchCriteria(matchCriteria), findDutation,
                    maxResults, incrementalCallback)
        {
        }

        public ProbeContext(Probe probe, TimeSpan findDuration,
            int maxResults, IncrementalResultsCallback incrementalCallback)
            : base(findDuration, maxResults)
        {
            this.probe = probe;
            this.incrementalCallback = incrementalCallback;
        }

        public IncrementalResultsCallback IncrementalResultsCallback
        {
            get
            {
                return incrementalCallback;
            }
        }

        public Probe Probe
        {
            get
            {
                return this.probe;
            }
        }
    }
}
